## creates a handler 
## 
function(request_handler handler)
  data("${handler}")
  ans(handler)
  is_map(${handler})
  ans(is_map)
  
  if(is_map)  
    map_tryget(${handler} callable)
    ans(callable)
    if(NOT COMMAND "${callable}")
      function_new()
      ans(new_callable)
      function_import("${callable}" as "${new_callable}" REDEFINE)
      map_set(${handler} callable "${new_callable}")
    endif()
    return(${handler})
  endif()

  if(COMMAND "${handler}")
    set(callable ${handler})
    if(NOT ARGN)
      handler_default("${callable}")
      return_ans()
    endif()
  else()
    function_new()
    ans(callable)
    function_import(${handler} as ${callable} REDEFINE)
    set(callable ${callable})
  endif()
  map_capture_new(
    callable
  )
  return_ans()
endfunction()